package com.example.smart.newsview;

import android.test.AndroidTestCase;
import android.test.InstrumentationTestCase;
import android.util.Log;
import com.example.smart.newsview.NewsInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by smart on 2017/11/23.
 */

public class TestNewsInfo extends AndroidTestCase {
    public void testfind(){
        List<News> news= null;
        try {
            news = NewsInfo.find(getContext().getResources().getString(R.string.serverpath));
            for (News newsitem:news){
                Log.e("TEST", "testfind: "+newsitem.toString() );
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log.e("TEST", "捕获异常: "+e);
        }


    }
}

